Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAYA-105368: set the edittarget to default into RootLayer instead of SessionLayer #661

Merged
merged 5 commits into from
Aug 6, 2020

Conversation

HamedSabri-adsk
Copy link
Contributor

No description provided.

@HamedSabri-adsk HamedSabri-adsk requested a review from ppt-adsk July 15, 2020 03:25
@HamedSabri-adsk HamedSabri-adsk added workflows Related to in-context workflows ufe-usd Related to UFE-USD plugin in Maya-Usd labels Jul 15, 2020
@kxl-adsk kxl-adsk requested a review from mattyjams July 15, 2020 17:36
Copy link
Contributor

@mattyjams mattyjams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. There's probably a balance to be struck here between defaulting to the root layer as the edit target and explicitly switching to the session layer when authoring data that you intend to be transient, versus defaulting to the session layer as the edit target and explicitly switching to the root layer when authoring data that you intend to be permanent. We'll probably just have to see as things progress whether one or the other makes more sense, both for the behavior in user workflows but also for developers building out those workflows.

Copy link

@kxl-adsk kxl-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the failing regression tests.

# since currently UFE will author attribute values at default time which won't override
# attributes with time sampled data. Switching to session layer allows such manipulation
# to override time sampled data from root layer.
stage.SetEditTarget(stage.GetSessionLayer())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kxl-adsk thanks for the patch that you gave me earlier.

self.assertEqual(stage.GetEditTarget().GetLayer(), stage.GetSessionLayer())

# set the edit target to the root layer
stage.SetEditTarget(stage.GetRootLayer())
self.assertEqual(stage.GetEditTarget().GetLayer(), stage.GetRootLayer())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kxl-adsk merged in dev into my branch and fixed the parenting test failures accordingly.

@HamedSabri-adsk HamedSabri-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge ufe-usd Related to UFE-USD plugin in Maya-Usd workflows Related to in-context workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants